<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../css/cambo.css">
    <title>Document</title>
</head>

<body>
    <!-- 卡片区域 -->
    <div class="layui-card cambo-list">

        <div class="layui-card-body">
            <!-- 筛选区域 -->
            <div class="layui-form" id="form-search">
                <!-- <div class="layui-form-item layui-inline">
                <select name="cate_id">
                    <option value="">所有分类</option>
                    <option value="">科技</option>
                    <option value="">生活</option>

                </select>
            </div> -->
                <!-- <div class="layui-form-item layui-inline">
                <select name="state">
                    <option value="">所有状态</option>
                    <option value="已发布">已发布</option>
                    <option value="草稿">草稿</option>
                </select>
            </div> -->
                <div class="layui-form-item layui-inline spj_header">
                    <span class="pl-img">
                        <i class="layui-icon">&#xe615;</i>
                    </span>
                    <input type="text" placeholder="请输入菜品名称" class="layui-input" id="searchList">
                    <div class="zhanweifu"></div>
                    <div class="batch">
                        <span class="layui-font-red" id="delall">批量删除</span>
                        <span class="layui-font-blue " id="strshopall">批量启售</span>
                        <span class="layui-font-red" id="stopshopall">批量停售</span>
                        <button class="layui-btn layui-btn-warm addCate layui-font-black " style="margin-left: 20px;">+
                            新建套餐</button>
                    </div>
                </div>
            </div>


            <!-- 列表区域 -->
            <table class="layui-table" lay-skin="line" lay-size="lg" lay-even>
                <colgroup>
                    <col width="175">
                    <col width="175">
                    <col>
                    <col>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>

                    <tr>
                        <th class="check-type">
                            <div class="check-box"><input type="checkbox" class="cambo-checkall checkall"></div>
                            套餐名称
                        </th>
                        <th class="check-img">
                            <div class="check-imgBox">
                                图片
                            </div>
                        </th>
                        <th>套餐分类</th>
                        <th>套餐价</th>
                        <th>售卖状态</th>
                        <th>最后操作时间</th>
                        <th class="check-img">
                            <div class="check-imgBox">
                                操作
                            </div>
                        </th>
                    </tr>
                </thead>
                <tbody lay-even>
                    <!-- <tr>
                        <td class="check-type">
                            <div class="check-box"><input type="checkbox" class="cambo-checkall"></div>
                            套餐名称
                        </td>
                        <td class="check-img">

                            <div class="check-imgBox">
                                <img src="../images/avatar10014.png" alt="">
                            </div>

                        </td>

                        <td>人生就像是一场修行</td>
                        <td>人生就像是一场修行</td>
                        <td>人生就像是一场修行</td>
                        <td>2022-06-04 02:34:45</td>
                        <td>
                            <div class="work-btn">
                                <span class="pl-blue jo changeshop">修改</span>
                                <span class="pl-blue jo stopshop">停售</span>
                                <span class="pl-red delshop">删除</span>
                            </div>
                        </td>
                    </tr> -->

                </tbody>
            </table>
            <div class="pl-failbox" style="display: none;">
                <span class="pl-fail layui-font-gray">
                    暂无数据
                </span>
            </div>

            <!-- 分页区域 -->
            <div id="pageBox"></div>
        </div>
    </div>


    <!-- 引入第三方插件 -->
    <script src="../layui/layui.js"></script>
    <script src="../lib/jquery.js"></script>
    <script src="../lib/template-web.js"></script>


    <script src="../js/cambo.js"></script>
    <script>
        $('.addCate').on('click', function () {
            location.href = '/index.html#/camboadd' //http://127.0.0.1:5500/index.html#/add
            window.location.reload();
        })
    </script>
</body>
<script type="text/html" id="tpl">
    {{each records}}
    <tr>
        <td class="check-type">
            <div class="check-box"><input type="checkbox" class="cambo-checkall j-checkbox" data-id="{{$value.id}}" data-status="{{$value.status}}"></div>
            {{$value.name}}
        </td>
        <td class="check-img">
    
            <div class="check-imgBox">
                <!-- <img src="http://121.4.102.44:8083/{{$value.image}}"  alt=""> -->
                <img src="http://121.4.102.44:8083/common/download?name={{$value.image}}" alt="">
            </div>
    
        </td>
    
        <td>{{$value.categoryName}}</td>
        <td>￥ {{$value.price}}</td>
        <td>{{$value.status | stateFormat}}  </td>
        <td>2022-06-04 02:34:45</td>
        <td>
            <div class="work-btn">
                <span class="pl-blue jo changeshop pl-change">修改</span>
                <span class="pl-blue jo stopshop btnEdit" data-id="{{$value.id}}" data-status="{{$value.status}}">{{$value.status | noFormat}}</span>
                <span class="pl-red delshop" data-id="{{$value.id}}">删除</span>
            </div>
        </td>
    </tr>
    
    {{/each}}
        </script>

</html>